/////////////////////////////////////////////
// ObjectARX defined commands

#include "StdAfx.h"
#include "StdArx.h"


// This is command 'WINDO'
void windo()
{
	AcDbBlockTableRecord *pBlkTableRecord;

	RectWindow *pRectWindow;	// RectWindow class

	pRectWindow = new RectWindow;

	
	if(!getWindowInputParameters(pRectWindow))
	{
		ads_printf("\nError in window input parameters. ");
		if(pRectWindow != NULL)
		{
			delete pRectWindow;
		}
		return;
	}

	if(!getModelSpaceRecord(pBlkTableRecord))
	{
		return;
	}

	pRectWindow->drawWindow(pBlkTableRecord);

	pBlkTableRecord->close();

	// Here is where we create our extension dictionary
	pRectWindow->addXtnData();

	// Here is where we extract data out of our dictionary
	pRectWindow->printXtnData();

	if(pRectWindow != NULL)
	{ 
		delete pRectWindow;
	}
}

